LangGraph

Miguel Conde

2025-01-27

Resources

FAQ

LangGraph stack

Control Flows

Agent

Many kinds of agents

The challenge

What is LangGraph for?

Basic demo

ReAct, a general agent architecture.

  • act - let the model call specific tools
  • observe - pass the tool output back to the model
  • reason - let the model reason about the tool output to decide what to do next (e.g., call another tool or just respond directly)

Advanced topics

  • Messages: trim, filter, summarize
  • External memory
  • Human-in-the-loop
    • Streaming:
      • Sync and async methods / “updates” and “values” modes
      • Messages / tokens
    • Breakpoints: a simple way to stop the graph at specific steps.
      • To interrupt the graph and await user approval before executing the next node.
      • But breakpoints are also opportunities to modify the graph state (editing the state) and introduce human feedback.
      • Breakpoints can be conditionally triggered (dynamic breakpoints)
    • Support for debugging: viewing, re-playing, and even forking from past states (time travel)
  • Parallelization
  • Sub-graphs
  • Map-Reduce

Demo - Research assistant

Demo - Research assistant

Short and Long-Term Memory

Short Term Memory

Long Term Memory

Memory store

Bonus